package com.hxkj.dao.impl;

import com.hxkj.dao.DictItemDao;
import com.hxkj.mapper.DictItemMapper;
import com.hxkj.domain.po.DictItem;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-05-21 17:59:26
*
*/
@Service("dictItemDao")
public class DictItemDaoImpl implements DictItemDao {

    @Resource
    private DictItemMapper dictItemMapper;

    @Override
    public DictItem get(Long dictItemId) {
        return dictItemMapper.selectByPrimaryKey(dictItemId);
    }

    @Override
    public List<DictItem> get(DictItem dictItem) {
        return dictItemMapper.select(dictItem);
    }

    @Override
    public int delete(Long dictItemId) {
        return dictItemMapper.deleteByPrimaryKey(dictItemId);
    }

    @Override
    public int delete(DictItem dictItem) {
        return dictItemMapper.delete(dictItem);
    }

    @Override
    public int save(DictItem dictItem) {
        return dictItemMapper.insert(dictItem);
    }

    @Override
    public int update(DictItem dictItem) {
        return dictItemMapper.update(dictItem);
    }

    @Override
    public List<DictItem> selectItemName(DictItem dictItem) {
        return dictItemMapper.selectItemName(dictItem);
    }

    @Override
    public List<DictItem> selectComboBox(DictItem dictItem) {
        return dictItemMapper.selectComboBox(dictItem);
    }
}
